//
//  Car.m
//  OC02_作业
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "Car.h"

@implementation Car
- (void)information{
    NSLog(@"type:%@, shiSu:%dkm/h", _type, _shiSu);
}

//- (void)setType:(NSString *)type {
//    _type = type;
//}
//- (NSString *)type {
//    return _type;
//}
//
//- (void)setShiSu:(int)shiSu {
//    _shiSu = shiSu;
//}
//- (int)shiSu {
//    
//    return _shiSu;
//}

- (instancetype)initWithType:(NSString *)type
                       shiSu:(int)shiSu {
    self = [super init];
    if (self) {
        _type = type;
        _shiSu = shiSu;
    }
    return self;
}

+ (instancetype)carWithType:(NSString *)type
                      shiSu:(int)shiSu {
    Car *car = [[Car alloc] initWithType:type shiSu:shiSu];
    return car;
}

@end
